# -*- coding: utf-8 -*-
"""
Created on Wed Feb 20 15:13:24 2019

@author: Administrator
"""
import numpy as np
#np.stack():
#参考https://blog.csdn.net/u013019431/article/details/79768219
#axis的0和1刚好是转置矩阵的关系

x = np.array([0, 1, 2])
y = np.array([0, 1, 3])
a = np.array([0, 0, 4])
b = np.array([5, 8, 6])
d = np.stack((x,y,a,b),axis=1)
print(d)
#---------
#[[0 0 0 5]
# [1 1 0 8]
# [2 3 4 6]]
d = np.stack((x,y,a,b),axis=0)
print(d)
#--------
#[[0 1 2]
# [0 1 3]
# [0 0 4]
# [5 8 6]]